<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" name="row[title]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">车辆:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-car_id" data-rule="required" data-source="car/selectpage" data-field="license_plate" class="form-control selectpage" name="row[car_id]" type="text" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">站点:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[circuit]" data-template="testtpl" id="second-table">
                <dd>
                    <ins>站点名称</ins>
                    <ins>坐标</ins>

                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[circuit]" class="form-control hide" cols="30" rows="5"></textarea>
            </dl>
            <!--定义模板，模板语法使用Art-Template模板语法-->
            <!--<input type="text" name="row[<%=name%>][<%=index%>][time]" class="form-control datetimepicker" data-date-format="HH:mm" style="width:120px" value="<%=row.time%>" placeholder="时间"/>-->
            <script type="text/html" id="testtpl">
                <dd class="form-inline">
                    <input type="text" name="row[<%=name%>][<%=index%>][name]" class="form-control" value="<%=row['name']%>" size="10">
                    <input type="text" name="row[<%=name%>][<%=index%>][coordinate]" class="form-control" value="<%=row['coordinate']%>" size="10">

                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remarks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remarks" class="form-control " rows="5" name="row[remarks]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
